<html>
<head><meta charset="utf-8"><title>format args · project-inline-asm · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/index.html">project-inline-asm</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/format.20args.html">format args</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="185065148"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/format%20args/near/185065148" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/format.20args.html#185065148">(Jan 07 2020 at 23:13)</a>:</h4>
<p>I'm reading the pre-rfc and seeing that the syntax seeks to intentionally mirror the format macro with e.g. <code>asm!("mov {}, 5", out(reg) x);</code>, but now that the RFC for implicit named format args has been accepted (<a href="https://github.com/rust-lang/rfcs/pull/2795" target="_blank" title="https://github.com/rust-lang/rfcs/pull/2795">https://github.com/rust-lang/rfcs/pull/2795</a>) that might warrant a note on whether or not <code>asm!</code>intends to support the same implicit capture syntax (which I assume it wouldn't?)</p>



<a name="185085069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/format%20args/near/185085069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/format.20args.html#185085069">(Jan 08 2020 at 06:46)</a>:</h4>
<p>You're right, we don't intend to support it. Mainly because it doesn't provide a way to specify in/out or the register class.</p>



<a name="185195003"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/format%20args/near/185195003" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/format.20args.html#185195003">(Jan 09 2020 at 09:16)</a>:</h4>
<p>Maybe we could extend the syntax, e.g., <code>{name:in}</code> and <code>{name:out}</code> and <code>{name:inout}</code> or similar</p>



<a name="185196133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/format%20args/near/185196133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/format.20args.html#185196133">(Jan 09 2020 at 09:33)</a>:</h4>
<p>We already use the space after <code>:</code> for template modifiers.</p>



<a name="185197042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/format%20args/near/185197042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/format.20args.html#185197042">(Jan 09 2020 at 09:48)</a>:</h4>
<p>there's gotta be some way to work it out.</p>



<a name="185199819"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/format%20args/near/185199819" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/format.20args.html#185199819">(Jan 09 2020 at 10:32)</a>:</h4>
<p>I decided to defer this for the future. It's not required for an MVP.</p>



<a name="185201686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/format%20args/near/185201686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/format.20args.html#185201686">(Jan 09 2020 at 11:03)</a>:</h4>
<p>Sounds good. Could we have an open tracking issue for this so that we don't forget ?</p>



<a name="185297123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/format%20args/near/185297123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/format.20args.html#185297123">(Jan 10 2020 at 10:15)</a>:</h4>
<p>I'll add it as future work in the RFC</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>